﻿<%@ Page Language="C#" AutoEventWireup="true" CodeFile="CheckScores.aspx.cs" Inherits="CheckScores" %>


<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
    <title>TEP 2009 - Introducir puntuaciones</title>
    <!--<link rel="stylesheet" type="text/css" href="css/styles.css" />-->
    <script src="js/jquery-1.3.2.min.js"></script>
    <script src="js/jquery.maskedinput-1.2.2.js"></script>
    <script>
    var REGEXP_PLAYER = "[|]+player+[|]+[0-9]+[|]"
function QrCodeData(data){
	var re = new RegExp(REGEXP_PLAYER);
  if (data.match(re)) {
    //alert("Successful match");
    var player = data.split("|")[2]
	//alert(player);
	reload(player);
  } else {
    //alert("Lechón, inténtalo de nuevo");
    return;
  }

	
	//regexp [|]+player+[|]+[0-9]+[|]
	
	//alert(data);
	
	/*if(data=="|player|2|"){
	    showscores();
	}else{
	    resetQR();
	}*/
	
}

function resetQR(){
    document.getElementById("ReadQrCode").resetQRCodeJS();
}




function init(){
     


    resetQR();
    
}


$(document).ready(function(){ 
    
}); 

function reload(player)
{

  document.location="ShowScores.aspx?id=" + player;
  //swfobject.removeSWF();
  //var tmp = findSWF("chart_0");
  //alert(document.getElementById("chart_0"));
  //var tmp=document.getElementById("chart_0");
  //var tmp= $("#chart_0");
  //
  // reload the data:
  //
  //x = tmp.reload();
  
  //
  // to load from a specific URL:
  // you may need to 'escape' (URL escape, i.e. percent escape) your URL if it has & in it
  //
  //
 //alert(tmp);
 //alert(tmp.reload);
 //tmp.reload("data.aspx?player="+player);
  
  //
  // do NOT show the 'loading...' message:
  //
 // x = tmp.reload("data.aspx", false);
}

function findSWF(movieName) {
  if (navigator.appName.indexOf("Microsoft")!= -1) {
    return window["ie_" + movieName];
  } else {
    return document[movieName];
  }
}


</script>
</head>
<body>
    <form id="form1" runat="server">
   <center> <table width="980px" height="580px" style=" margin-top:20px; background-image:url(img/bg_player.png); background-repeat:no-repeat">        
        <tr>
            <td align=left>
    <div style="margin-top:90px; margin-left:92px">
    <object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=10,0,0,0" id="ReadQrCode" width="350" height="350" align="middle">
<param name="allowScriptAccess" value="sameDomain" />
<param name="movie" value="swf/ReadQrCode.swf" /><param name="quality" value="high" /><param name="bgcolor" value="#ffffff" /><embed src="swf/ReadQrCode.swf" quality="high" bgcolor="#ffffff" width="350" height="350" swLiveConnect=true id="Embed1" name="ReadQrCode" align="middle" allowScriptAccess="sameDomain" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer_es" />
</object></div></td>
         <td>
         <!--<input type="button" value="Dale"  onclick="init();">&nbsp;-->
            
         </td>   
        </tr>
        
    </table>
       </center>
    </form>
</body>
</html>
